<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<title>过往工作量查询</title>
<meta name="decorator" content="default" />
<script type="text/javascript">
	$(document).ready(function() {

		
		
		var tab = document.getElementById("contentTable");

		//表格行数
		var rows = tab.rows.length;
		//表格列数
		var cells = tab.rows.item(0).cells.length;

		if(rows > 1){// 不要第一行的 thead)
		for ( var i = 1; i < rows; i++) {
		 var totalWork=	$("#contentTable tr:eq("+i+") td:eq(2)").text();
		var accomplish=$("#contentTable tr:eq("+i+") td:eq(3)").text();
		var completeness = Math.round(accomplish / totalWork * 10000)
		/ 100.00 + "%";
			$("#contentTable tr:eq("+i+") td:eq(4)").html(completeness);
		}

		}
		
	});
	function page(n, s) {
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
		return false;
	}
</script>
<style type="text/css">


</style>

</head>
<body>
	<ul class="nav nav-tabs">
		<li class="active">
			<a href="javascript:void(0)">过往工作量查询</a>
		</li>
	</ul>
	<sys:message content="${message}" />
	<div>
		<table id="contentTable" style="table-layout: fixed;" class="table table-striped table-bordered table-condensed" border="1">
			<thead>
				<tr>
					<th>部员</th>
					<th>时间</th>
					<th>计划工作量</th>
					<th>实际工作量</th>
					<th>完成率</th>
					
				</tr>
			</thead>
			<tbody>
				<c:forEach items="${postWorkloadList}" var="workloadList">
					<tr>

						<td>
						
						${workloadList.dividerName}
							
						</td>
						<td>
						<fmt:formatDate value="${workloadList.createDate}" pattern="yyyy年-MM月"/>
						</td>
						
						<td>
							<span class="totalWork">${workloadList.totalWork}</span>
						</td>
						<td>
							<span class="accomplish"> ${workloadList.accomplish}</span>
						</td>
						<td>
							<span class="completeness">${workloadList.accomplish/workloadList.totalWork}</span>
						</td>
						
					</tr>
				</c:forEach>
			</tbody>
		</table>
	</div>

	
	<br/>
	<%-- <c:if test="${empty postWorkloadList}">
		<p style="font-size: 20px; width: 350px; margin: 0px auto;">请去选择客户</p>
	</c:if> --%>
	
	<div style="width: 55px;position: fixed;top:5px;right:5%;">
		<button class="btn" onclick="javascript:window.location='${ctx}/crm/mission/mission/workloadlist'">返回</button>
	</div>
	
</body>
</html>